using System;
using System.Collections.Generic;
using Be.Timvw.Framework.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Be.Timvw.Framework.Domain.Ranges
{
    [TestClass]
    public class WhenGettingDateRangeValues
    {
        [TestMethod]
        public void ShouldReturnThreeDaysForRangeOfThreeDays()
        {
            DateRange period = new DateRange(new DateTime(2008, 1, 1), new DateTime(2008, 1, 3));
            IEnumerable<DateTime> actual = period.Values;

            IEnumerable<DateTime> expected = new DateTime[]
                {
                new DateTime(2008, 1, 1),
                new DateTime(2008, 1, 2),
                new DateTime(2008, 1, 3)
                };

            Assert.IsTrue(EnumerableHelper.HaveSameElements(expected, actual));
        }
    }
}